﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;
using ProjectBase.Core.Web;
using ProjectBase.Mvc;
using ProjectBase.Mvc.Models;

using Survey.Common.Models.Services;
using Survey.Entity.Services;

namespace Survey.Mvc.Models.Services
{
    /// <summary>
    ///     All data and binding properties for 'Article' Views
    /// </summary>
    public class ArticleModel : EntityModel<Article, ArticleFilter>, IArticleModel
    {
        #region members
        IEnumerable<Attachment> _attachments;
        #endregion members

        #region IArticleModel Members
        /// <summary>
        ///     This allowes to bind the string comming from the form
        ///     into thsi property
        /// </summary>
        public virtual string SourceText { get; set; }

        /// <summary>
        ///     Serves as the data source for the Converted WC renderer
        /// </summary>
        public virtual string ConvertedText { get; set; }

        public virtual IEnumerable<Attachment> Attachments
        {
            get { return _attachments ?? (_attachments = new List<Attachment>()); }
            set { _attachments = value; }
        }
        #endregion
    }
}